import { defHttp } from '#/api/request';

export function GetResourceList(query: any) {
  return defHttp.request('system/menu/list', {
    method: 'get',
    params: query,
  });
}
export function SaveOrUpdate(obj: any) {
  return obj.id ? UpdateObj(obj) : AddObj(obj);
}
export function AddObj(obj: any) {
  return defHttp.request('system/menu', {
    method: 'post',
    data: obj,
  });
}

export function UpdateObj(obj: any) {
  return defHttp.request(`/system/menu`, {
    method: 'put',
    data: obj,
  });
}

export function DelObj(id: any) {
  return defHttp.request(`/system/menu/${id}`, {
    method: 'delete',
  });
}
// 查询菜单详细
export function getMenu(menuId: string) {
  return defHttp.request(`/system/menu/${menuId}`, { method: 'get' });
}
export function GetBuildStandardList(query: any) {
  return defHttp.request('/suite/dynamic_release_drag', {
    method: 'get',
    params: query,
  });
}
